﻿@model FantasyDraft2.Models.User

@{
    ViewBag.Title = "Register";
}

<h2>Register</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>User</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Age)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Age)
            @Html.ValidationMessageFor(model => model.Age)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TeamId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TeamId)
            @Html.ValidationMessageFor(model => model.TeamId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Score)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Score)
            @Html.ValidationMessageFor(model => model.Score)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Birthdate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Birthdate)
            @Html.ValidationMessageFor(model => model.Birthdate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateOfFormation)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateOfFormation)
            @Html.ValidationMessageFor(model => model.DateOfFormation)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TeamName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TeamName)
            @Html.ValidationMessageFor(model => model.TeamName)
        </div>

        <p>
            <input type="submit" value="Register" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
